package com.edu.nchu.study.controller;

import com.edu.nchu.study.model.Customer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
import java.util.UUID;

@RestController
@RequestMapping("/api/")
public class NewapiController {

    @GetMapping("map")
    public Object mapApi() {
        //Map<Integer, String>  map = Map.of(2017, "junior", 2018, "senior");
        return  null;
    }

    @GetMapping("data")
    public Object customerData() {
        Customer customer = Customer.builder().id(UUID.randomUUID().toString())
                .name("customer").build();
        return customer;
    }
}
